package com.freight.user.util;

import com.freight.user.vo.UserVo;

import java.util.HashMap;
import java.util.List;

public class UserVoUtils<T extends UserVo> {

    public static <T extends UserVo> HashMap<Long, T> listToHashMap(List<T> users) {
        HashMap<Long, T> res = new HashMap<>();
        for (T user : users) {
            res.put(user.getUserId(), user);
        }
        return res;
    }
}
